package com.yywz;

import java.io.File;
import java.util.ArrayList;

public class SystemFile {
	
	private static ArrayList arrayList = new ArrayList();
	
	public static void main(String[] args) {
		refreshFileList("d:\\Apache2");
	}
	
	//使用递归算法
	public static void refreshFileList(String path){
		File file = new File(path);
		File[] files = file.listFiles();
		if(files == null)
			return;
		for(int i = 0; i < files.length; i++){
			if(files[i].isDirectory()){
				refreshFileList(files[i].getAbsolutePath());
			} else {
				String fileName = files[i].getAbsolutePath().toLowerCase();
				System.out.println(fileName);
			}
		}
	}
	
}
